﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TicketMaster.Object
{
    public class Route
    {
        [Key]
        public int Id { get; set; }

        public string StartPointId { get; set; }

        public virtual City StartPoint { get; set; }

        public string EndPointId { get; set; }

        public virtual City EndPoint { get; set; }

        public double Rate { get; set; }

        [Required]
        public double Distance { get; set; }

        public virtual ICollection<Comment> Comments { get; set; }

        public virtual ICollection<Merchant> Merchants { get; set; }

        public Route()
        {
            this.Comments = new HashSet<Comment>();
            this.Merchants = new HashSet<Merchant>();
        }
    }
}
